]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
extensions-app: Explicitly dispose window when removed
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 18 Nov 2020 01:16:26 +0000 (02:16 +0100)
committerMarge Bot <marge-bot@gnome.org>
Thu, 14 Jan 2021 13:03:21 +0000 (13:03 +0000)
Unlike in previous GTK version (or Clutter), destroy() no longer
breaks reference cycles but just releases the reference held by
GTK itself.

So any reference we hold - either the explicit property or any signal
handlers that bind the window as `this` - prevents the window from
being disposed when closed, and the application won't quit.

Work around this by explicitly running dispose() on the window when
it is removed from the application.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1495>

subprojects/extensions-app/js/main.js

index dc993ef96681cb418ba408ee1301d3f1294b702e..8ff753d56bf8fef608a1e79133c9792b688b4310 100644 (file)
@@ -42,6 +42,8 @@ class Application extends Gtk.Application {
     _init() {
         GLib.set_prgname('gnome-extensions-app');
         super._init({ application_id: 'org.gnome.Extensions' });
+
+        this.connect('window-removed', (a, window) => window.run_dispose());
     }
 
     get shellProxy() {